home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / program / 570 / include / stat.h < prev    next >
C/C++ Source or Header  |  1990-11-15  |  1KB  |  36 lines

  1. /*
  2.  *    STAT.H
  3.  */
  4.  
  5. #ifndef    STAT_H
  6. #define    STAT_H
  7.  
  8. #include <types.h>
  9.  
  10. struct stat            /* maps to the DTA up to the st_name field */
  11.     {
  12.     char    st_rsvd[21];        /* reserved field. DON'T TOUCH! */
  13.     uchar    st_mode;        /* file mode flags */
  14.     time_t    st_mtime;        /* last modification time/date */
  15.     long    st_size;        /* file size in bytes */
  16.     char    st_name[14];        /* file name */
  17.     dev_t    st_dev;            /* drive id (0 == A:) */
  18.     uchar    st_nlink;        /* number of links (always == 1) */
  19.     };
  20.  
  21. #define    st_atime    st_mtime    /* last access time */
  22. #define    st_ctime    st_mtime    /* creation time */
  23. #define    st_rdev        st_dev        /* drive id */
  24.  
  25. #define    S_IFMT        0xD6        /* mask for type of file */
  26. #define    S_IFHID        0x02        /* hidden */
  27. #define    S_IFSYS        0x04        /* system */
  28. #define    S_IFDIR        0x10        /* directory */
  29. #define    S_IREAD        0x40        /* read permission */
  30. #define    S_IWRITE    0x80        /* write permission */
  31. #define    S_ISRO        0x01        /* file is read-only */
  32. #define    S_ISVOL        0x08        /* file is volume label */
  33. #define    S_ISARC        0x20        /* file is written to and closed? */
  34.  
  35. #endif STAT_H
  36.